As is known in the prior art, magnetic field sensors such as Hall sensors may be used to detect changes in a magnetic field, for example, to detect a relative position of a magnetic field source. The Hall sensor may detect at least two magnetic flux density components to determine a magnetic flux density vector; with reference to exemplary values of flux density components Bz and By, the value |B| of the magnetic flux density B and the angle α between the radial component By and the vector of the flux density B can be calculated according to the following equations:
                                        B                          =                                            Bz              2                        +                          By              2                                                          (        1        )                                α        =                  arctan          ⁡                      (                          Bz              By                        )                                              (        2        )            
European Patent Application EP 2159546 A2 discloses a measurement method for detecting linear relative movements between a Hall sensor which detects two mutually perpendicular magnetic field components (R, A) and a permanent magnet. The output signals of the Hall sensor form a quasi-linear position measurement curve U=f(y) according to the relationship y=a+b·R/f·(c·Rn+d·An) where R is the radial field component, A is the axial field component, U is the measurement voltage and a, b, c, d and n are constant factors. In this method, the factor b may be dynamically adapted as a scaling factor for the temperature coefficient of the permanent magnet, detected for example by means of a temperature sensor.
Although EP 2159546 A2 discloses compensating for the temperature coefficient of the permanent magnet, both the measurement method of EP 2159546 A2 and conventional 2D and 3D Hall sensors and measurement methods react to variations in the spacing between the control magnet and the Hall sensor in a very sensitive manner. Variations in spacing, for example, because of mechanical vibrations or even thermally caused material expansion, can significantly influence the accuracy of the measurements of the Hall sensor.
In order to overcome or at least minimize the effect of the spacing between the permanent magnetic field and the Hall sensor, a measurement method was developed with Offset-Slope adaption (OS adaption) and a corresponding displacement sensor, as described in the published German Patent Application DE 10 2011 115 302 A1. In comparison with conventional Hall sensors having internal arctangent calculation as shown in Equation 2 above, a 2D or 3D Hall sensor with OS adaption uses a different calculation method in which the direct quotient of the detected magnetic field components Bz to By are not used for the calculation of the measurement signal or the angle α. Instead, the magnetic field component Bz which extends in a movement direction of the magnet is corrected by means of a constant offset value.
That offset value OS results in a slope assimilation of the curves for the angle α for different spacings d between a permanent magnet and Hall sensor. The corrected values of the angle α are established according to the following equation:
                              α          OS                =                  arctan          ⁡                      (                                          Bz                +                OS                            By                        )                                              (        3        )            
In order to obtain an adequate effect for the OS adaption, the offset value OS is generally defined at from 20% to 60% of the value of the magnetic field component Bz. The OS values can be established by one of the methods described in DE 10 2011 115 302 A1.
The use of the evaluation method with OS adaption can result in a negative influence on the temperature behaviour of the arctangent calculation by means of the magnetic field of a control magnet. Although the values of the detected magnetic field components Bz and By for the temperature T of the magnetic field are influenced by the same thermal variations of the control magnet, temperature compensation is not provided in Equation 3 using the OS adaption. Depending on the relationship of the individual terms in Equation 3, there is produced a temperature-dependent additional error of up to 12%, which is unacceptable for the measurement accuracy of the 3D Hall sensor.
In order to be able to completely utilise the evaluation behaviour with OS adaption, therefore, a compensation of the temperature effect of the magnetic control field on the measurement signals of the magnetic sensor is absolutely necessary.